<template>
	<view class="p-page p-desc-page">
		<view class="title"> 宣传标语 </view>
		<textarea   v-model="tmp.slogan" placeholder="请输入30字内的房源标语 内容将显示于房源置顶及宣传海报" @change="change1" />
		<view class="title"> 房源评价 </view>
		<textarea v-model="tmp.describe" placeholder="" @change="change2" />
	</view>
</template>

<script>
	export default { 
	 data() {
	    return {
	      tmp:{ }, 
	    }
	  },
	  created(){
	    var { slogan , describe} = this.$store.state.publishInfo
	    this.tmp  = { slogan , describe}
	  },
	  mounted(){ 
	      console.log(this.tmp);
	  },
	  methods:{
		  input(e){
			  console.log(e);
		  },  
	      change1(value,event){
	        this.tmp.slogan = value 
	        this.$store.dispatch("asyncTmp",this.tmp);
	      },
	      change2(value,event){
	        this.tmp.describe = value
	        this.$store.dispatch("asyncTmp",this.tmp);
	      }
	  }
	}
</script>

<style lang="scss">
	.p-desc-page {
		textarea {
			width: 90%;
			height: 100px;
			border-radius: 10px;
			border: 1px solid #CCC;
			padding: 10px;
			margin: 20px 0;
		}
	}
</style>
